package org.example.font.controller;


import org.example.font.model.EmpPostData;
import org.example.font.model.Result;
import org.example.font.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/report")
public class ReportController {
    @Autowired
    private ReportService reportService;

    /**
     * 统计员工性别
     * @return
     */
    @GetMapping("/empGenderData")
    public Result getEmpGenderData()
    {
        List<Map> empGenderDataList =  reportService.getEmpGenderData();
        return Result.success(empGenderDataList);
    }
    /**
     * 部门员工人数统计
     * @return
     */
    @GetMapping("/empPostData")
    public Result getEmpPostData() {
        EmpPostData postData = reportService.getEmpPostData();
        return Result.success(postData);
    }

    // 员工学历统计

    // 班级人数统计
}
